package com.zhiwang.planet.util

import com.zhiwang.planet.R

class ColorStore {

    companion object {

        val tagColor = listOf(R.color.tag_color1, R.color.tag_color2, R.color.tag_color3
                , R.color.tag_color4, R.color.tag_color5, R.color.tag_color6,
                R.color.tag_color7, R.color.tag_color8,
                R.color.tag_color9, R.color.tag_color10,
                R.color.tag_color11, R.color.tag_color12, R.color.tag_color13,
                R.color.tag_color14, R.color.tag_color15)

        //"休闲",
        //"音乐",
        //"女生"
        fun getTagColor(tag: String) = when (tag) {
            "益智" -> R.color.tag_color1
            "休闲" -> R.color.tag_color2
            "冒险" -> R.color.tag_color3
            "烧脑" -> R.color.tag_color4
            "魔性" -> R.color.tag_color5
            "射击" -> R.color.tag_color6
            "音乐" -> R.color.tag_color7
            "女生" -> R.color.tag_color8
            "合成" -> R.color.tag_color9
            "对战" -> R.color.tag_color10
            "模拟" -> R.color.tag_color11
            "经营" -> R.color.tag_color12
            "武侠" -> R.color.tag_color13
            "换装" -> R.color.tag_color14
            else -> tagColor[tag.hashCode() % 15]
        }

    }


}